package com.jdklangtest;


import java.io.Closeable;
import java.io.IOException;

/**
 * CustomLock
 *
 * @author lupeng10
 * @create 2023-07-28 12:05
 */
public class CustomLock {

    public static void main(String[] args) {
        try (Lock lock = new Lock()){
            System.out.println("aaaaa");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    static class Lock implements Closeable {

        @Override
        public void close() throws IOException {
            System.out.println("guanbi");
        }
    }

}
